home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / UBound.au3 < prev    next >
Text File  |  2006-06-17  |  477b  |  18 lines

  1. Dim $myArray[10][20]   ;element 0,0 to 9,19
  2. $rows = UBound($myArray)
  3. $cols = UBound($myArray, 2)
  4. $dims = UBound($myArray, 0)
  5.  
  6. MsgBox(0, "The " & $dims & "-dimensional array has", _
  7.     $rows & " rows, " & $cols & " columns")
  8.  
  9. ;Display $myArray's contents
  10. $output = ""
  11. For $r = 0 to UBound($myArray,1) - 1
  12.     $output = $output & @LF
  13.     For $c = 0 to UBound($myArray,2) - 1
  14.         $output = $output & $myArray[$r][$c] & " "
  15.     Next
  16. Next
  17. MsgBox(4096,"Array Contents", $output)
  18.